package com.sgb.goods.api;

import com.sgb.goods.entity.GoodsInfoTypeEntity;
import com.sgb.goods.entity.inquiry.InquiryDetailsEntity;
import com.sgb.goods.entity.ShopPriceInfoEntity;
import com.sgb.goods.entity.inquiry.InquirySearchSupplierEntity;
import com.sgb.goods.entity.inquiry.MapLongAndLatEntity;
import com.sgb.goods.entity.inquiry.PriceCheckEntity;
import com.sgb.goods.entity.inquiry.PriceCheckListEntity;
import com.sgb.goods.entity.inquiry.SupplierEntity;
import com.sgb.goods.entity.inquiry.UrlEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.ListResponse;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 描述：询价相关的接口API
 *
 * @author qiangHeNooo
 * 时间：2021.10.29
 */
public interface InquiryApi {
    /**
     * 删除询价
     *
     * @param no 询价No
     * @return
     */
    @POST("v1/app/user/goods/enquiry/enquiryDelete")
    Call<BaseEntity<Object>> enquiryDelete(@Query("no") String no);

    /**
     * 取消询价
     *
     * @param no
     * @return
     */
    @POST("v1/app/user/goods/enquiry/enquiryCancel")
    Call<BaseEntity<Object>> enquiryCancel(@Query("no") String no);

    /**
     * 询价发布
     *
     * @param priceCheckEntity
     * @return
     */
    @POST("v1/app/user/goods/enquiry/goodsEnquiryPublish")
    Call<BaseEntity<Object>> publishPriceCheck(@Body PriceCheckEntity priceCheckEntity);

    /**
     * 我的询价列表
     *
     * @param tcatName
     * @param page
     * @param limit
     * @param status
     * @return
     */
    @FormUrlEncoded
    @POST("v1/app/user/goods/enquiry/myEnquiryList")
    Call<BaseEntity<ListResponse<List<PriceCheckListEntity>>>> getPriceCheckList(@Field("tcatName") String tcatName, @Field("page") int page, @Field("limit") int limit, @Field("status") int status);

    /**
     * 询价详情
     *
     * @param goodsSourceNo 询价No
     * @return
     */
    @POST("v1/app/user/goods/enquiry/enquiryDtail")
    Call<BaseEntity<InquiryDetailsEntity>> enquiryDetails(@Query("no") String goodsSourceNo);

    /**
     * 卸车方式
     *
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getUnloadRequire")
    Call<BaseEntity<List<GoodsInfoTypeEntity>>> getUnLoadDemand();

    /**
     * 询价方式
     *
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getEnquiryType")
    Call<BaseEntity<List<GoodsInfoTypeEntity>>> getPriceCheckDemand();

    /**
     * 支付方式
     */
    @POST("v1/app/user/goods/enquiry/getPayWay")
    Call<BaseEntity<List<GoodsInfoTypeEntity>>> getPayWay();

    /**
     * 会员询价  发布询价-会员询价-获取当前用户的供方会员
     */
    @POST("v1/app/user/goods/enquiry/getSupplierMember")
    Call<BaseEntity<List<SupplierEntity>>> getSupplierMember();

    /**
     * 装车方式  装车要求
     */
    @POST("v1/app/user/goods/enquiry/getLoadingRequire")
    Call<BaseEntity<List<GoodsInfoTypeEntity>>> getLoadDemand();

    /**
     * 获取资源文件路径
     *
     * @param param
     * @return
     */
    @GET("v1/app/common/getUrlSetting")
    Call<BaseEntity<UrlEntity>> getUrlSetting(@Query("param") String param);

    /**
     * 运货要求
     *
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getDeliveryRequire")
    Call<BaseEntity<List<GoodsInfoTypeEntity>>> getDeliverDemand();

    /**
     * 获取地址经纬度
     *
     * @param areaCode
     * @param provinceNo
     * @param cityNo
     * @param districtNo
     * @return
     */
    @POST("v1/app/logistics/getAddressCoordinate")
    Call<BaseEntity<MapLongAndLatEntity>> getLocationLL(@Query("areaCode") String areaCode, @Query("provinceNo") String provinceNo, @Query("cityNo") String cityNo, @Query("districtNo") String districtNo);

    /**
     * 获取地址经纬度
     *
     * @param areaCode
     * @param provinceNo
     * @param cityNo
     * @return
     */
    @POST("v1/app/logistics/getAddressCoordinate")
    Call<BaseEntity<MapLongAndLatEntity>> getLocationLL(@Query("areaCode") String areaCode, @Query("provinceNo") String provinceNo, @Query("cityNo") String cityNo);

    /**
     * 报价详情查询
     *
     * @param no
     * @return
     */
    @GET("v1/app/user/goods/quote/quoteGoodsInfo")
    Call<BaseEntity<ShopPriceInfoEntity>> getQuoteGoodsInfo(@Query("no") String no);

    /**
     * 询价 供应商列表
     *
     * @param entity 请求体
     * @return
     */
    @POST("v1/app/user/goods/enquiry/goodsEnquirySearchCompany")
    Call<BaseEntity<List<SupplierEntity>>> getSupplier(@Body InquirySearchSupplierEntity entity);



    @POST("v1/app/user/goods/enquiry/getMemberCustomer")
    Call<BaseEntity<ListResponse<List<SupplierEntity>>>> getMemberCustomer(@Body InquirySearchSupplierEntity entity);

}
